package com.spica.spicaschool.persistence.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.spica.spicaschool.bean.news.News

@Dao
interface NewsDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insert(newsList: List<News>)


    @Query("SELECT * FROM news")
    suspend fun queryAll(): List<News>


    @Query("DELETE  FROM news")
    suspend fun deleteAll()

}